<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
    <script src="js/vue.js"></script>
    <script src="js/axios.min.js"></script>
    <div id="app">
        <input type="button" value="get a joke" @click="getjoke">
        <p>{{ joke }}</p>
<!--        <p>{{ response.data }}</p>-->
    </div>
    <script>
        var app = new Vue({
            el: '#app',
            data:{
                joke: "show a joke"
            },
            methods:{
                getjoke:function () {
                    var that = this;
                    axios.get("https://autumnfish.cn/api/joke").then(
                        function (response) {
                            console.log(response)
                            that.joke = response.data
                        },
                        function (error) {
                            console.log("error||||")
                        }
                    )
                }
            }
        })
    </script>


</body>
</html>